package com.suray.basic.wcs.path.core;

import com.suray.basic.wcs.utils.Coord;

import java.util.Objects;


/**
 * @author Shaozn
 */
public class Lifter {

    private int x;
    private int y;

    public Lifter(Coord coord) {
        this.x = coord.getX();
        this.y = coord.getY();
    }

    public Lifter(int x, int y) {
        this.x = x;
        this.y = y;
    }

    @Override
    public String toString() {
        return "Lifter{" +
                "x=" + x +
                ", y=" + y +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (o == null) {
            return false;
        }
        if (this == o) {
            return true;
        }
        Lifter lifter = (Lifter) o;
        return x == lifter.x &&
                y == lifter.y ;
    }

    @Override
    public int hashCode() {

        return Objects.hash(x, y);
    }

    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }

}
